import service from '@/core/net/request'

export function getRuleList(page) {
  return service.get(`/api/admin/rule/${page}`)
}

export function createRule(data) {
  return service.post('/api/admin/rule', data)
}

export function updateRule(id, data) {
  return service.post('/api/admin/rule/' + id, data)
}

export function updateRuleStatus(id, status) {
  return service.post(`/api/admin/rule/${id}/update_status`, {
    status,
  })
}

export function deleteRule(id) {
  return service.post(`/api/admin/rule/${id}/delete`)
}
